import request from '@/utils/request'; // 导入请求工具，需要根据实际情况修改路径

export function listDoc(query) {
  return request({
    url: '/system/docdraw/list', // 后端接口地址，需要根据实际情况修改
    method: 'get',
    params: query
  });
}


// 历史版本查看接口
export function showData(docMasterId) {
console.log(docMasterId)
  return request({
    url: '/system/docdraw/docHistoryList?sysDocMasterId='+docMasterId,
    method: 'get',
  })
}


// 图纸信息接口
export function docDrawList(docId) {
console.log(docId)
  return request({
    url: '/system/docdraw/docDrawList?sysDocId='+docId,
    method: 'get',
  })
}

//图纸下载  返回url
export function downloadDraw(drawId) {
  return request({
    url: '/system/docdraw/download/draw?drawId='+drawId,
    method: 'get',
    responseType: 'blob'
  })
}

//图纸下载  返回流
export function downloadDrawStr(drawId) {
  return request({
    url: '/system/docdraw/download/drawStr?drawId='+drawId,
    method: 'get',

  })
}


